home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / cpp_libs / answrbok / 4_6.lha / 4_6 / randint.c < prev    next >
Text File  |  1993-08-08  |  412b  |  19 lines

  1. * Copyright (c) 1990 by AT&T Bell Telephone Laboratories, Incorporated. */
  2. * The C++ Answer Book */
  3. * Tony Hansen */
  4. * All rights reserved. */
  5. oid srand48(long);
  6. ong mrand48();
  7. include <stream.h>
  8.  
  9. ain()
  10.  
  11.    cout << "int randints[] =\n{\n";
  12.    srand48(31415926);
  13.    for (int i = 0; i < 10000 - 1; i++)
  14. cout << "    " << mrand48() << ",\n";
  15.    cout << "    " << mrand48() << "\n";
  16.    cout << "};\n";
  17.    return 0;
  18.  
  19.